<?php
namespace jianan\models;

use Yii;
use yii\db\ActiveRecord;

class Master extends ActiveRecord {

	public static function tableName(){

		return '{{jianan_master}}';
	}

	public function rules(){
		return [
			[['isLock','masterGroupId','masterName','email','password','salt','lastLoginTime','lastLoginIp','commonMenus','isSuper','validateCode','mobile'],'required'],
			[['isLock','masterGroupId','lastLoginTime','isSuper'],'integer'],
			[['masterName','email','password','salt','lastLoginIp','validateCode','mobile'],'string']
		];
	}

	public function attributeLables(){

		return [
			'id' => 'ID',
			'isLock' => '是否锁定',
			'masterGroupId' => '管理组ID',
			'masterName' => '管理员名称',
			'email' => '邮箱',
			'password' => '密码',
			'salt' => '扰码',
			'lastLoginTime' => '上次登录时间',
			'lastLoginIp' => '上次登录IP',
			'commonMenus' => '常用菜单',
			'isSuper' => '是否是超级管理员',
			'validateCode' => '找回密码的验证code',
			'mobile' => '管理员联系电话'
		];
	}
}